package cn.itcast.activiti.servlet.user;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
/**
 * 用户登录
 * @author Administrator
 *
 */

@WebServlet("/login.action")
public class LoginServlet extends HttpServlet{

	private static final long serialVersionUID = 1957505550868948261L;
	
	@Override
	protected void service(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		
		//获取用户名
		String username=request.getParameter("username");
		//获取密码
		String userPwd=request.getParameter("userpwd");
		
		//获取Session对象
		HttpSession session=request.getSession();
		session.setAttribute("username", username);
		
		
		response.sendRedirect(request.getContextPath()+"/queryUserClaimTask.action");
		
		
		
		
	}
}
